package com.ziyuan.State;

import com.ziyuan.ConstraintValidated.ConstraintVallidated;
import jakarta.validation.Constraint;
import jakarta.validation.MessageInterpolator;
import jakarta.validation.Payload;
import jakarta.validation.groups.Default;

import java.lang.annotation.*;

@Documented
@Constraint(
        validatedBy = {ConstraintVallidated.class}
)
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface State {
//     错误提示信息
     String message() default "{元素只能是那两个值}";
//分组
     Class<?>[] groups() default {};

     Class<? extends Payload>[] payload() default {};
}
